package com.gxuwz.com_property.role.service.Impl;

import com.gxuwz.com_property.role.mapper.RoleMapper;
import com.gxuwz.com_property.role.pojo.Role;
import com.gxuwz.com_property.role.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> findAllRole() {
        return roleMapper.findAllRole();
    }

    @Override
    public Role findRoleById(Role role) {
        return roleMapper.findRoleById(role);
    }

    @Override
    public boolean updateRoleById(Role role) {
        return roleMapper.updateRoleById(role);
    }

    @Override
    public boolean delectRoleById(int id) {
        return roleMapper.delectRoleById(id);
    }

    @Override
    public boolean addRole(Role role) {
        return roleMapper.addRole(role);
    }
}
